﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using LuKou.Shopspace.Domains;
using LuKou.Web.BLL.Service;
using LuKou.Web.Controllers.Base;

namespace LuKou.Web.Controllers.Website
{
    /// <summary>
    /// 数据下载控制器
    /// </summary>
    public class DownloadController : WebBaseController
    {
        /// <summary>
        /// 下载图片数据包
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ActionResult ImageData(long id)
        {
            Goods goods = GoodsService.GetGoodsDetail(id);
            if (goods != null)
            {
                return Redirect("~/" + goods.DataFileURL);
            }
            return RedirectIndex();
        }
    }
}
